import Layout from '@/layout'
import Shim from '@/layout/LayoutShim'

const _import = require('../_import_' + process.env.NODE_ENV)

const templateRouterMap = [
  {
    path: '/Template',
    component: Layout,
    redirect: 'noredirect',
    name: 'Template',
    meta: { title: '示例', icon: 'im im-pizza' },
    children: [
      {
        path: 'Page1',
        name: 'TemplatePage1',
        component: _import('Template/Page1'),
        meta: { title: '树形选择器' }
      },
      {
        path: 'Page2',
        name: 'TemplatePage2',
        component: _import('Template/Page2'),
        meta: { title: '左右布局' }
      },
      {
        path: 'Page3',
        name: 'TemplatePage3',
        component: _import('Template/Page3'),
        meta: { title: '显示更多区域' }
      },
      {
        path: 'Page4',
        name: 'TemplatePage4',
        component: _import('Template/Page4'),
        meta: { title: '编辑页排版', refresh: true }
      },
      {
        path: 'DataTable',
        name: 'TemplateDataTable',
        redirect: '/Template/DataTable/Page5',
        component: Shim,
        meta: { title: '数据表格' },
        children: [
          {
            path: 'Page5',
            name: 'TemplateDataTablePage5',
            component: _import('Template/DataTable/Page5'),
            meta: { title: '数据表格表现一' }
          },
          {
            path: 'Page6',
            name: 'TemplateDataTablePage6',
            component: _import('Template/DataTable/Page6'),
            meta: { title: '数据表格表现二' }
          },
          {
            path: 'Page8',
            name: 'TemplateDataTablePage8',
            component: _import('Template/DataTable/Page8'),
            meta: { title: '数据表格表现三', refresh: true }
          }
        ]
      },
      {
        path: 'Page7',
        name: 'TemplatePage7',
        component: _import('Template/Page7'),
        meta: { title: '只读指令' }
      },
      {
        path: 'Page9',
        name: 'TemplatePage9',
        component: _import('Template/Page9'),
        meta: { title: '相同模板不同展示', info: 'first', tagsGroup: 'Display', tagsTitle: '编辑展示' }
      },
      {
        path: 'Page9Other',
        name: 'TemplatePage9Other',
        component: _import('Template/Page9'),
        meta: { title: '相同模板不同展示2', info: 'second', tagsGroup: 'Display', tagsTitle: '编辑展示' }
      }
    ]
  }
]

export default templateRouterMap
